#Daniel Duran

import sys

print 'Enter a whole number integer'
userInput = int(input())
primeList = [2, 3]

#lower limit
if userInput <= 100:
    for n in range(5, 100, 2):
        divisible = False
        for x in range(2, n):
            if n % x == 0:
                divisible = True;
                break
        if divisible == False:
            primeList.append(n)

#user defined limit
elif userInput > 100 and userInput+1 < 10000:
    for n in range(5, userInput, 2):
        divisible = False
        for x in range(2, n):
            if n % x == 0:
                divisible = True;
                break
        if divisible == False:
            primeList.append(n)

#upper limit
else:
    for n in range(5, 10000, 2):
        divisible = False
        for x in range(2, n):
            if n % x == 0:
                divisible = True;
                break
        if divisible == False:
            primeList.append(n)
#print list
print primeList